import { NgModule } from "@angular/core";
import { Routes, RouterModule } from "@angular/router";
import { ForgotComponent } from "./cpt/forgot/forgot.component";
import { Forgot2Component } from "./cpt/forgot2/forgot2.component";
import { MyComponent } from "./cpt/my/my.component";
import { LoginComponent } from "@/user/cpt/login/login.component";
import { EnrollComponent } from "@/user/cpt/enroll/enroll.component";

import { RoleGuardService } from "@/share/services/role-guard.service";

const routes: Routes = [
  {
    path: "my",
    component: MyComponent,
    canActivate: ["AuthGuardService"],
    data: {}
  },
  {
    path: "login",
    component: LoginComponent,
    data: { title: "c" }
  },
  {
    path: "enroll",
    component: EnrollComponent,
    data: { title: "c" }
  },
  {
    path: "forgot",
    component: ForgotComponent,
    data: { title: "c" }
  },
  {
    path: "forgot2",
    component: Forgot2Component,
    data: { title: "c" }
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class UserRoutingModule {}
